# Contributor: Simon Thorpe <simon@hivetechnology.com.au>
# Contributor: James Pearson <james.m.pearson+arch@gmail.com>

pkgname=python-easygui
_pyname=easygui
pkgver=0.98.3
pkgrel=1
pkgdesc="Python module for very simple, very easy GUI programming"
url="https://easygui.readthedocs.io"
license=('BSD')
arch=('any')
depends=('python' 'tk')
makedepends=('python-setuptools')
source=(https://files.pythonhosted.org/packages/cc/ad/e35f7a30272d322be09dc98592d2f55d27cc933a7fde8baccbbeb2bd9409/$_pyname-$pkgver.tar.gz)
sha256sums=('d653ff79ee1f42f63b5a090f2f98ce02335d86ad8963b3ce2661805cafe99a04')

build() {
  cd $_pyname-$pkgver
  python setup.py build
}

package(){
  cd $_pyname-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
  sed -n '/LICENSE INFORMATION/,/"""/ p' setup.py > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
